Resource URL: /platform/<<version=3>>/cloud/jobs/<JOB>

    Overview: This resource retrieves filse associated with individual
              cloudpool jobs. JOB in the resource path is the job ID.

     Methods: GET, PUT

********************************************************************************

Method GET: Retrieve cloudpool job information.

       URL: GET /platform/<<version=3>>/cloud/jobs/<JOB>

Query arguments:

GET response body schema:
{
  "type": [
    {
      "additionalProperties": false, 
      "type": "object", 
      "description": "A list of errors that may be returned.", 
      "properties": {
        "errors": {
          "items": {
            "additionalProperties": false, 
            "type": "object", 
            "description": "An object describing a single error.", 
            "properties": {
              "field": {
                "type": "string", 
                "description": "The field with the error if applicable."
              }, 
              "message": {
                "type": "string", 
                "description": "The error message."
              }, 
              "code": {
                "type": "string", 
                "description": "The error code."
              }
            }
          }, 
          "type": "array"
        }
      }
    }, 
    {
      "additionalProperties": false, 
      "type": "object", 
      "properties": {
        "jobs": {
          "minItems": 0, 
          "items": {
            "type": "object", 
            "description": "A cloud job for archiving or recalling files", 
            "properties": {
              "files": {
                "type": "object", 
                "description": "The files and filters addressed by this job", 
                "properties": {
                  "total_failed": {
                    "type": "integer", 
                    "description": "The number of files which failed"
                  }, 
                  "total_succeeded": {
                    "type": "integer", 
                    "description": "The total number of files successfully completed"
                  }, 
                  "total_processing": {
                    "type": "integer", 
                    "description": "The number of files currently being processed"
                  }, 
                  "total_pending": {
                    "type": "integer", 
                    "description": "The number of files pending action"
                  }, 
                  "total_canceled": {
                    "type": "integer", 
                    "description": "The number of canceled files"
                  }, 
                  "file_matching_pattern": {
                    "type": "object", 
                    "description": "The file filtering logic to find files for this job"
                  }, 
                  "names": {
                    "items": {
                      "type": "object", 
                      "properties": {
                        "state": {
                          "type": "string", 
                          "description": "The current state of this file"
                        }, 
                        "name": {
                          "type": "string", 
                          "description": "The full path name of a file to be acted on by this job"
                        }
                      }
                    }, 
                    "type": "array", 
                    "description": "A list of files to be addressed by this job.  (Note* these are only reported when audit_level is 'high'"
                  }, 
                  "total": {
                    "type": "integer", 
                    "description": "The total number of files addressed by this job"
                  }
                }
              }, 
              "job_engine_job": {
                "type": "object", 
                "description": "Information about the related job engine job if there is one", 
                "properties": {
                  "state": {
                    "enum": [
                      "null", 
                      "running", 
                      "user-paused", 
                      "system-paused", 
                      "policy-paused", 
                      "waiting", 
                      "user-canceled", 
                      "system-canceled", 
                      "failed", 
                      "succeeded"
                    ], 
                    "type": "string", 
                    "description": "The state of the related job engine job"
                  }, 
                  "id": {
                    "type": "integer", 
                    "description": "ID of the related job engine job"
                  }
                }
              }, 
              "operation_state": {
                "enum": [
                  "running", 
                  "paused"
                ], 
                "type": "string", 
                "description": "The current state of the operation associated with the job"
              }, 
              "description": {
                "type": "string", 
                "description": "A brief description of the job contents"
              }, 
              "effective_state": {
                "enum": [
                  "running", 
                  "paused", 
                  "canceled", 
                  "completed", 
                  "failed"
                ], 
                "type": "string", 
                "description": "The effective state of the job (e.g,. the combination of operation_state and job_state)"
              }, 
              "job_state": {
                "enum": [
                  "running", 
                  "paused", 
                  "canceled", 
                  "completed", 
                  "failed"
                ], 
                "type": "string", 
                "description": "The current state of the job"
              }, 
              "state_change_time": {
                "type": "integer", 
                "description": "The last time at which the job state changed"
              }, 
              "completion_time": {
                "type": "integer", 
                "description": "The time at which the job was completed (if applicable)"
              }, 
              "create_time": {
                "type": "integer", 
                "description": "The time at which the job was created"
              }, 
              "type": {
                "enum": [
                  "archive", 
                  "recall", 
                  "local-garbage-collection", 
                  "cloud-garbage-collection", 
                  "cache-writeback", 
                  "cache-on-access", 
                  "cache-invalidation", 
                  "restore-coi"
                ], 
                "type": "string", 
                "description": "The type of cloud action to be performed by this job."
              }, 
              "id": {
                "type": "integer", 
                "description": "The job's ID"
              }
            }
          }, 
          "type": "array", 
          "maxItems": 4294967295
        }, 
        "resume": {
          "minLength": 0, 
          "type": [
            "string", 
            "null"
          ], 
          "description": "Continue returning results from previous call using this token (token should come from the previous call, resume cannot be used with other options)."
        }
      }
    }
  ]
}

********************************************************************************

Method PUT: Modify a cloud job or operation.

       URL: PUT /platform/<<version=3>>/cloud/jobs/<JOB>

Query arguments:

PUT request body schema:
{
  "type": "object", 
  "description": "A cloud job for archiving or recalling files", 
  "properties": {
    "all": {
      "type": "boolean", 
      "description": "Whether to apply to the given operation type or to all jobs of the given operation type"
    }, 
    "state": {
      "enum": [
        "resume", 
        "pause", 
        "cancel"
      ], 
      "type": "string", 
      "description": "The desired state of the job or operation"
    }
  }
}

There is no JSON response body for this method.
